package com.demo.userprofile.component.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController("sayHelloServer")
public class SayHelloServer {

    @Autowired
    private SayHelloService sayHelloService;

    @ResponseBody
    @RequestMapping(value = "/getHelloWords", method = RequestMethod.GET)
    public String getHelloWords(String name) {
        return name + "" + sayHelloService.getWords();
    }
}
